home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 June: Reference Library / Dev.CD Jun 99 RL Disk 1.toast / Technical Documentation / Develop / develop Issue 28 / develop Issue 28 code / MacApp Debugging / TwistDownLists / UTwistDownControl.h < prev    next >
Encoding:
Text File  |  1996-07-15  |  3.3 KB  |  100 lines  |  [TEXT/MPS ]

  1. //----------------------------------------------------------------------------------------
  2. // UTwistDownControl.h
  3. // ETO20 MacApp 3.3.1, MPW 3.4.1
  4. // Copyright ©1994-1996 Conrad Kopala
  5. // Twist Down Lists version 2.0a0 7/15/96
  6. //----------------------------------------------------------------------------------------
  7.  
  8. #ifndef __UTWISTDOWNCONTROL__
  9. #define __UTWISTDOWNCONTROL__
  10.  
  11. #ifndef __UTWISTDOWNVIEW__
  12. #include "UTwistDownView.h"
  13. #endif
  14.  
  15. //MacApp stuff
  16. #ifndef __UCONTROL__
  17. #include "UControl.h"
  18. #endif
  19.  
  20. #ifndef __UCOMMAND__
  21. #include "UCommand.h"
  22. #endif
  23.  
  24. //ToolBox stuff
  25. //None
  26.  
  27. //ANSI stuff
  28. //None
  29.  
  30. //----------------------------------------------------------------------------------------
  31. // Constants
  32. //----------------------------------------------------------------------------------------
  33. enum EHiliteState {
  34.     noHilite = 0,
  35.     blackHilite = 1,
  36.     whiteHilite = 2
  37. };
  38. //----------------------------------------------------------------------------------------
  39. // Forward and external classes
  40. //----------------------------------------------------------------------------------------
  41. //none
  42. //----------------------------------------------------------------------------------------
  43. // TTwistDownControl
  44. //----------------------------------------------------------------------------------------
  45.  
  46. class TTwistDownControl: public TControl
  47. {
  48.     MA_DECLARE_CLASS;
  49.     
  50. public:
  51. TTwistDownElement* fTwistDownElement;
  52. TTwistDownDocument* fTwistDownDocument;
  53. TTwistDownView* fTwistDownView;
  54. EHiliteState fHiliteState;
  55. EHiliteState fNewHiliteState;
  56.  
  57. TTwistDownControl::TTwistDownControl(); 
  58. virtual ~TTwistDownControl();
  59.  
  60. virtual void TTwistDownControl::ITwistDownControl(VPoint& itsLocation, 
  61.                                                                                         TTwistDownElement* itsTwistDownElement,
  62.                                                                                         TTwistDownView* itsSuperView);
  63.  
  64. TTwistDownElement* TTwistDownControl::GetTwistDownElement();
  65. void TTwistDownControl::UpdateControlLocationTo(short rowNumber);
  66. void TTwistDownControl::UpdateControlSizeTo();
  67. void TTwistDownControl::SetLocationTo(VPoint& itsLocation);
  68.  
  69. virtual void TTwistDownControl::SuperViewChangedFrame(const VRect& oldFrame,
  70.                                   const VRect& newFrame,Boolean invalidate);
  71.                                     
  72. virtual void TTwistDownControl::Draw(const VRect& area);                                                                        
  73. virtual void TTwistDownControl::DoMouseUp(VPoint& theMouse, TToolboxEvent* event, CPoint hysteresis);
  74. virtual void TTwistDownControl::DoEvent(EventNumber eventNumber, TEventHandler* source, TEvent* event);                                    
  75.  
  76. virtual void TTwistDownControl::Hilite();
  77. virtual void TTwistDownControl::HiliteState(Boolean state, Boolean redraw);
  78. virtual void TTwistDownControl::TrackMouse(TrackPhase aTrackPhase,
  79.                                    VPoint& anchorPoint,VPoint& previousPoint,VPoint& nextPoint,
  80.                                    Boolean mouseDidMove);
  81.                                         
  82. void TTwistDownControl::FillTriangleBlack();
  83. void TTwistDownControl::FillTriangleGray();
  84. void TTwistDownControl::FillTriangleWhite();
  85.  
  86. void TTwistDownControl::EraseControlArea();
  87.  
  88. void TTwistDownControl::DrawClosedTriangle();
  89. void TTwistDownControl::DrawOpenTriangle();
  90. void TTwistDownControl::DrawIntermediateTriangle();
  91.  
  92. };
  93.  
  94. //----------------------------------------------------------------------------------------
  95. // Global initialization procedure
  96. //----------------------------------------------------------------------------------------
  97.  
  98. extern void InitUTwistDownControl();
  99.  
  100. #endif